Optimal. Leaf size=228 \[ \frac {\sin ^{-1}(d x) \left (4 d^2 \left (A \left (2 d^2 e^2+f^2\right )+2 B e f\right )+C \left (4 d^2 e^2+3 f^2\right )\right )}{8 d^5}+\frac {\sqrt {1-d^2 x^2} \left (4 \left (C \left (d^2 e^3-8 e f^2\right )-4 f \left (3 A d^2 e f+B \left (d^2 e^2+f^2\right )\right )\right )-f x \left (3 f^2 \left (4 A d^2+3 C\right )-2 d^2 e (C e-4 B f)\right )\right )}{24 d^4 f}+\frac {\sqrt {1-d^2 x^2} (e+f x)^2 (C e-4 B f)}{12 d^2 f}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^3}{4 d^2 f} \]
________________________________________________________________________________________
Rubi [A] time = 0.49, antiderivative size = 228, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {1609, 1654, 833, 780, 216} \begin {gather*} \frac {\sqrt {1-d^2 x^2} \left (4 \left (C \left (d^2 e^3-8 e f^2\right )-4 f \left (3 A d^2 e f+B \left (d^2 e^2+f^2\right )\right )\right )-f x \left (3 f^2 \left (4 A d^2+3 C\right )-2 d^2 e (C e-4 B f)\right )\right )}{24 d^4 f}+\frac {\sin ^{-1}(d x) \left (4 d^2 \left (A \left (2 d^2 e^2+f^2\right )+2 B e f\right )+C \left (4 d^2 e^2+3 f^2\right )\right )}{8 d^5}+\frac {\sqrt {1-d^2 x^2} (e+f x)^2 (C e-4 B f)}{12 d^2 f}-\frac {C \sqrt {1-d^2 x^2} (e+f x)^3}{4 d^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 216
Rule 780
Rule 833
Rule 1609
Rule 1654
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {1-d x} \sqrt {1+d x}} \, dx &=\int \frac {(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {C (e+f x)^3 \sqrt {1-d^2 x^2}}{4 d^2 f}-\frac {\int \frac {(e+f x)^2 \left (-\left (\left (3 C+4 A d^2\right ) f^2\right )+d^2 f (C e-4 B f) x\right )}{\sqrt {1-d^2 x^2}} \, dx}{4 d^2 f^2}\\ &=\frac {(C e-4 B f) (e+f x)^2 \sqrt {1-d^2 x^2}}{12 d^2 f}-\frac {C (e+f x)^3 \sqrt {1-d^2 x^2}}{4 d^2 f}+\frac {\int \frac {(e+f x) \left (d^2 f^2 \left (7 C e+12 A d^2 e+8 B f\right )+d^2 f \left (3 \left (3 C+4 A d^2\right ) f^2-2 d^2 e (C e-4 B f)\right ) x\right )}{\sqrt {1-d^2 x^2}} \, dx}{12 d^4 f^2}\\ &=\frac {(C e-4 B f) (e+f x)^2 \sqrt {1-d^2 x^2}}{12 d^2 f}-\frac {C (e+f x)^3 \sqrt {1-d^2 x^2}}{4 d^2 f}+\frac {\left (4 \left (C \left (d^2 e^3-8 e f^2\right )-4 f \left (3 A d^2 e f+B \left (d^2 e^2+f^2\right )\right )\right )-f \left (3 \left (3 C+4 A d^2\right ) f^2-2 d^2 e (C e-4 B f)\right ) x\right ) \sqrt {1-d^2 x^2}}{24 d^4 f}+\frac {\left (C \left (4 d^2 e^2+3 f^2\right )+4 d^2 \left (2 B e f+A \left (2 d^2 e^2+f^2\right )\right )\right ) \int \frac {1}{\sqrt {1-d^2 x^2}} \, dx}{8 d^4}\\ &=\frac {(C e-4 B f) (e+f x)^2 \sqrt {1-d^2 x^2}}{12 d^2 f}-\frac {C (e+f x)^3 \sqrt {1-d^2 x^2}}{4 d^2 f}+\frac {\left (4 \left (C \left (d^2 e^3-8 e f^2\right )-4 f \left (3 A d^2 e f+B \left (d^2 e^2+f^2\right )\right )\right )-f \left (3 \left (3 C+4 A d^2\right ) f^2-2 d^2 e (C e-4 B f)\right ) x\right ) \sqrt {1-d^2 x^2}}{24 d^4 f}+\frac {\left (C \left (4 d^2 e^2+3 f^2\right )+4 d^2 \left (2 B e f+A \left (2 d^2 e^2+f^2\right )\right )\right ) \sin ^{-1}(d x)}{8 d^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 160, normalized size = 0.70 \begin {gather*} \frac {3 \sin ^{-1}(d x) \left (4 d^2 \left (A \left (2 d^2 e^2+f^2\right )+2 B e f\right )+C \left (4 d^2 e^2+3 f^2\right )\right )-d \sqrt {1-d^2 x^2} \left (12 A d^2 f (4 e+f x)+8 B \left (d^2 \left (3 e^2+3 e f x+f^2 x^2\right )+2 f^2\right )+C \left (12 d^2 e^2 x+16 e f \left (d^2 x^2+2\right )+3 f^2 x \left (2 d^2 x^2+3\right )\right )\right )}{24 d^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [B] time = 0.47, size = 708, normalized size = 3.11 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {1-d x}}{\sqrt {d x+1}}\right ) \left (-8 A d^4 e^2-4 A d^2 f^2-8 B d^2 e f-4 C d^2 e^2-3 C f^2\right )}{4 d^5}-\frac {\sqrt {1-d x} \left (\frac {144 A d^3 e f (1-d x)}{d x+1}+\frac {144 A d^3 e f (1-d x)^2}{(d x+1)^2}+\frac {48 A d^3 e f (1-d x)^3}{(d x+1)^3}+48 A d^3 e f+\frac {12 A d^2 f^2 (1-d x)}{d x+1}-\frac {12 A d^2 f^2 (1-d x)^2}{(d x+1)^2}-\frac {12 A d^2 f^2 (1-d x)^3}{(d x+1)^3}+12 A d^2 f^2+\frac {72 B d^3 e^2 (1-d x)}{d x+1}+\frac {72 B d^3 e^2 (1-d x)^2}{(d x+1)^2}+\frac {24 B d^3 e^2 (1-d x)^3}{(d x+1)^3}+24 B d^3 e^2+\frac {24 B d^2 e f (1-d x)}{d x+1}-\frac {24 B d^2 e f (1-d x)^2}{(d x+1)^2}-\frac {24 B d^2 e f (1-d x)^3}{(d x+1)^3}+24 B d^2 e f+\frac {40 B d f^2 (1-d x)}{d x+1}+\frac {40 B d f^2 (1-d x)^2}{(d x+1)^2}+\frac {24 B d f^2 (1-d x)^3}{(d x+1)^3}+24 B d f^2+\frac {12 C d^2 e^2 (1-d x)}{d x+1}-\frac {12 C d^2 e^2 (1-d x)^2}{(d x+1)^2}-\frac {12 C d^2 e^2 (1-d x)^3}{(d x+1)^3}+12 C d^2 e^2+\frac {80 C d e f (1-d x)}{d x+1}+\frac {80 C d e f (1-d x)^2}{(d x+1)^2}+\frac {48 C d e f (1-d x)^3}{(d x+1)^3}+48 C d e f-\frac {9 C f^2 (1-d x)}{d x+1}+\frac {9 C f^2 (1-d x)^2}{(d x+1)^2}-\frac {15 C f^2 (1-d x)^3}{(d x+1)^3}+15 C f^2\right )}{12 d^5 \sqrt {d x+1} \left (\frac {1-d x}{d x+1}+1\right )^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 192, normalized size = 0.84 \begin {gather*} -\frac {{\left (6 \, C d^{3} f^{2} x^{3} + 24 \, B d^{3} e^{2} + 16 \, B d f^{2} + 16 \, {\left (3 \, A d^{3} + 2 \, C d\right )} e f + 8 \, {\left (2 \, C d^{3} e f + B d^{3} f^{2}\right )} x^{2} + 3 \, {\left (4 \, C d^{3} e^{2} + 8 \, B d^{3} e f + {\left (4 \, A d^{3} + 3 \, C d\right )} f^{2}\right )} x\right )} \sqrt {d x + 1} \sqrt {-d x + 1} + 6 \, {\left (8 \, B d^{2} e f + 4 \, {\left (2 \, A d^{4} + C d^{2}\right )} e^{2} + {\left (4 \, A d^{2} + 3 \, C\right )} f^{2}\right )} \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right )}{24 \, d^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.64, size = 277, normalized size = 1.21 \begin {gather*} -\frac {{\left ({\left (d x + 1\right )} {\left (2 \, {\left (d x + 1\right )} {\left (\frac {3 \, {\left (d x + 1\right )} C f^{2}}{d^{4}} + \frac {4 \, B d^{17} f^{2} + 8 \, C d^{17} f e - 9 \, C d^{16} f^{2}}{d^{20}}\right )} + \frac {12 \, A d^{18} f^{2} + 24 \, B d^{18} f e - 16 \, B d^{17} f^{2} + 12 \, C d^{18} e^{2} - 32 \, C d^{17} f e + 27 \, C d^{16} f^{2}}{d^{20}}\right )} + \frac {3 \, {\left (16 \, A d^{19} f e - 4 \, A d^{18} f^{2} + 8 \, B d^{19} e^{2} - 8 \, B d^{18} f e + 8 \, B d^{17} f^{2} - 4 \, C d^{18} e^{2} + 16 \, C d^{17} f e - 5 \, C d^{16} f^{2}\right )}}{d^{20}}\right )} \sqrt {d x + 1} \sqrt {-d x + 1} - \frac {6 \, {\left (8 \, A d^{4} e^{2} + 4 \, A d^{2} f^{2} + 8 \, B d^{2} f e + 4 \, C d^{2} e^{2} + 3 \, C f^{2}\right )} \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {d x + 1}\right )}{d^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.03, size = 423, normalized size = 1.86 \begin {gather*} -\frac {\sqrt {-d x +1}\, \sqrt {d x +1}\, \left (6 \sqrt {-d^{2} x^{2}+1}\, C \,d^{3} f^{2} x^{3} \mathrm {csgn}\relax (d )+8 \sqrt {-d^{2} x^{2}+1}\, B \,d^{3} f^{2} x^{2} \mathrm {csgn}\relax (d )+16 \sqrt {-d^{2} x^{2}+1}\, C \,d^{3} e f \,x^{2} \mathrm {csgn}\relax (d )-24 A \,d^{4} e^{2} \arctan \left (\frac {d x \,\mathrm {csgn}\relax (d )}{\sqrt {-d^{2} x^{2}+1}}\right )+12 \sqrt {-d^{2} x^{2}+1}\, A \,d^{3} f^{2} x \,\mathrm {csgn}\relax (d )+24 \sqrt {-d^{2} x^{2}+1}\, B \,d^{3} e f x \,\mathrm {csgn}\relax (d )+12 \sqrt {-d^{2} x^{2}+1}\, C \,d^{3} e^{2} x \,\mathrm {csgn}\relax (d )+48 \sqrt {-d^{2} x^{2}+1}\, A \,d^{3} e f \,\mathrm {csgn}\relax (d )+24 \sqrt {-d^{2} x^{2}+1}\, B \,d^{3} e^{2} \mathrm {csgn}\relax (d )-12 A \,d^{2} f^{2} \arctan \left (\frac {d x \,\mathrm {csgn}\relax (d )}{\sqrt {-d^{2} x^{2}+1}}\right )-24 B \,d^{2} e f \arctan \left (\frac {d x \,\mathrm {csgn}\relax (d )}{\sqrt {-d^{2} x^{2}+1}}\right )-12 C \,d^{2} e^{2} \arctan \left (\frac {d x \,\mathrm {csgn}\relax (d )}{\sqrt {-d^{2} x^{2}+1}}\right )+9 \sqrt {-d^{2} x^{2}+1}\, C d \,f^{2} x \,\mathrm {csgn}\relax (d )+16 \sqrt {-d^{2} x^{2}+1}\, B d \,f^{2} \mathrm {csgn}\relax (d )+32 \sqrt {-d^{2} x^{2}+1}\, C d e f \,\mathrm {csgn}\relax (d )-9 C \,f^{2} \arctan \left (\frac {d x \,\mathrm {csgn}\relax (d )}{\sqrt {-d^{2} x^{2}+1}}\right )\right ) \mathrm {csgn}\relax (d )}{24 \sqrt {-d^{2} x^{2}+1}\, d^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.27, size = 231, normalized size = 1.01 \begin {gather*} -\frac {\sqrt {-d^{2} x^{2} + 1} C f^{2} x^{3}}{4 \, d^{2}} + \frac {A e^{2} \arcsin \left (d x\right )}{d} - \frac {\sqrt {-d^{2} x^{2} + 1} B e^{2}}{d^{2}} - \frac {2 \, \sqrt {-d^{2} x^{2} + 1} A e f}{d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} {\left (2 \, C e f + B f^{2}\right )} x^{2}}{3 \, d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} {\left (C e^{2} + 2 \, B e f + A f^{2}\right )} x}{2 \, d^{2}} - \frac {3 \, \sqrt {-d^{2} x^{2} + 1} C f^{2} x}{8 \, d^{4}} + \frac {{\left (C e^{2} + 2 \, B e f + A f^{2}\right )} \arcsin \left (d x\right )}{2 \, d^{3}} + \frac {3 \, C f^{2} \arcsin \left (d x\right )}{8 \, d^{5}} - \frac {2 \, \sqrt {-d^{2} x^{2} + 1} {\left (2 \, C e f + B f^{2}\right )}}{3 \, d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 33.64, size = 1732, normalized size = 7.60
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________